
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>page2</title>
</head>
<body>

<%
    int num = Integer.parseInt( request.getParameter("num"));
    int s=0;
    for (int i=1;i<=num;i++){
        s+=i;
    }
    out.write("1到100的和为："+s);
%>

</body>
</html>
